home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
ddj0897.zip
/
DYN401.ZIP
/
examples
/
exam12
/
main.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-09-27
|
1KB
|
79 lines
/*
*
* This source code is CONFIDENTIAL and
* PROPRIETARY to Algorithms Corporation. Unauthorized
* distribution, adaptation or use may
* be subject to civil and criminal penalties.
*
* Copyright (c) 1993 Algorithms Corporation
* 3020 Liberty Hills Drive
* Franklin, TN 37064
*
* ALL RIGHTS RESERVED.
*
*
*
*/
#include "generics.h"
main(int argc, char *argv[])
{
object myObj;
char *p;
InitDynace(&argc);
myObj = gNew(Class1);
/* Call the SetName method via the gSetName generic. Notice that
the instance being effected is the first argument to the generic.
This is always the case. */
gSetName(myObj, "Tom Jones");
/* Get a pointer to the name associated with myObj */
p = gGetName(myObj);
/* Display it. */
printf("The name is %s\n", p);
gDispose(myObj);
return 0;
}
/*
*
* This source code is CONFIDENTIAL and
* PROPRIETARY to Algorithms Corporation. Unauthorized
* distribution, adaptation or use may
* be subject to civil and criminal penalties.
*
* Copyright (c) 1993 Algorithms Corporation
* 3020 Liberty Hills Drive
* Franklin, TN 37064
*
* ALL RIGHTS RESERVED.
*
*
*
*/